package com.zhku.laosiji.dao;

import com.zhku.laosiji.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    User selectByUsername(String name);

    //显示所有用户
    List<User> queryUser();

    //根据用户名或电话查找用户
    List<User> selectUserByNameOrTel(@Param("search")String search);

    //禁用用户
    int stopUser(Integer id);

    //启用用户
    int startUser(Integer id);
}